package com.hectopascal.goalance.pojo.dto;

import jakarta.persistence.*;
import org.hibernate.annotations.CurrentTimestamp;

import java.util.Date;

@Table(name="notification")
@Entity
public class NotificationBack {
    @Id
    @Column(name = "id")
    private Integer id;
    @Column(name = "user_id")
    private Integer userId;
    @Column(name="author_id")
    private Integer authorId;
    private String type;
    private String content;
    @Column(name="is_read")
    private Integer isRead;
    @Column(name="created_at")
    @CurrentTimestamp
    @Temporal(TemporalType.TIMESTAMP)
    private Date createdAt;

    public NotificationBack() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getAuthorId() {
        return authorId;
    }

    public void setAuthorId(Integer authorId) {
        this.authorId = authorId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getIsRead() {
        return isRead;
    }

    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public String toString() {
        return "NotificationBack{" +
                "id=" + id +
                ", userId=" + userId +
                ", authorId=" + authorId +
                ", type='" + type + '\'' +
                ", content='" + content + '\'' +
                ", isRead=" + isRead +
                ", createdAt=" + createdAt +
                '}';
    }
}
